package leetcode.interview1714;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Interview1714 implements IDebug {

	public abstract int[] smallestK(int[] arr, int k);

	@Override
	public void debug1() {
//		输入： arr = [1,3,5,7,2,4,6,8], k = 4
//		输出： [1,2,3,4]
		String input1 = "[1,3,5,7,2,4,6,8]";
		int input2 = 4;
		String output = "[1,2,3,4]";
		this.debug(input1, input2, output);
	}

	private void debug(String input1, int input2, String output) {
		int[] arr = HelpDebug.str2array3(input1);
		int[] result = this.smallestK(arr, input2);
		int[] expect = HelpDebug.str2array3(output);
		HelpDebug.compare(expect, result);
	}

	@Override
	public void debug2() {

	}

	@Override
	public void debug3() {

	}

	@Override
	public void debug4() {

	}

}
